package com.x.chalk.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class UsefulNews {
    /**
     * 序号
     */
    private Integer id;
    /**用户id*/
    private Integer uid;
    /**
     * 标题
     */
    private String title;
    /**
     * 文字内容
     */
    private String content;
    /**
     * 点赞数
     */
    private Integer likes;
    /**
     * 阅读量
     */
    private Integer readnum;
    /**
     * 评论数
     */
    private Integer comments;
    /**
     * 创建时间
     */
    private Date ctime;
    /**
     * 转发
     */
    private Integer forwardId;

    public UsefulNews(String title,String content, Integer uid) {
        this.title = title;
        this.uid=uid;
        this.content=content;
        this.likes=0;
        this.readnum=0;
        this.ctime = new Date();
        this.forwardId=0;
    }
}
